package com.zhangh.summer.admin.support.spring;

import com.zhangh.summer.admin.support.id.IdSetting;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @description: TODO
 * @author: zhanghui  zhanghlucky@163.com
 * @create: 2021-09-01 22:43`       q
 **/
@Component
public class IdRunnerConfig implements ApplicationRunner {
    @Resource
    private IdSetting idSetting;

    @Override
    public void run(ApplicationArguments args) throws Exception {
       idSetting.initWorkerID();
    }
}
